﻿using System;

using Kaiser.Models;
using Kaiser.Models.InputModels;

namespace Kaiser.Services
{
    public interface IUserService
    {
        User GetItem(int userID);
        User GetItem(string username);
        User GetItem(string username, UserStatus status);
        bool IsExists(string username);
        bool IsExists(int userID);
        bool ValidateUser(int userID, string username);
        DataGrid<UserBasic> GetList(UserSearch criteria, PagingInfo pageingInfo);
        ModelResult SaveEdit(UserInputEdit userInput);
        ModelResult SaveAdd(UserInputAdd userInput);
        ModelResult Save(UserInput userInput);
        void SetPasswordByUserName(string username, string password);
        bool Remove(int userID);
        bool ChangeStatus(int userID, UserStatus status);
        bool SignIn(Func<User> getUser, Action<User> afterSignIn);
        void SignOut();
    }
}
